<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddTypeToOwnerItems extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('owner_items', function (Blueprint $table) {
            $table->string('type', 20)->default(\App\Models\OwnerItem::TYPE_DEFAULT);
            $table->unsignedTinyInteger('exceed_day')->default(0)->comment('年月日，只要超出时间了，都按照超出多少天来进行计算');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('owner_items', function (Blueprint $table) {
            $table->dropColumn('type');
            $table->dropColumn('exceed_day');
        });
    }
}
